package com.lw.alarm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lw.alarm.dao.AlarmNoticeLogMapper;
import com.lw.alarm.model.AlarmNoticeLog;
import com.lw.alarm.model.AlarmServer;
import com.lw.alarm.service.AlarmNoticeLogServiceI;
import com.lw.common.core.dao.BaseDAO;
import com.lw.common.core.service.BaseService;

/**
 * 
 * @Title: UserServiceImpl.java
 * @Package com.lw.service.impl
 * @Description: 用户service
 * @author 刘伟 15818570028@163.com
 * @date 2016年12月21日 下午6:57:07
 * @version V1.0
 */
@Service("alarmNoticeLogService")
public class AlarmNoticeLogServiceImpl extends BaseService<AlarmNoticeLog, Integer> implements AlarmNoticeLogServiceI {
	@Resource
	private AlarmNoticeLogMapper alarmNoticeLogMapper;

	@Override
	public BaseDAO<AlarmNoticeLog, Integer> getDao() {
		return alarmNoticeLogMapper;
	}

	@Override
	public PageInfo<AlarmNoticeLog> findAlarmNoticeLogByPage(AlarmNoticeLog r, int page, int rows) {
		PageHelper.startPage(page, rows);
		PageHelper.orderBy("create_time desc");
		List<AlarmNoticeLog> list = alarmNoticeLogMapper.findObjectsByPage(r);
		return new PageInfo<AlarmNoticeLog>(list);
		
	}

}
